#include<iostream>
#include<string>
using namespace std;

class A{
private:
	int a;
public:
	A(){

	}
	A(int a){
		this->a=a;
	}
	virtual void printA(){
		cout<<"A print ..."<<a<<endl;
	}
};
class B:public A{
private:
	int b;
public:
	B(int b):A(){
		this->b=b;
	}
	virtual void printA(){
	cout<<"print B..."<<b<<endl;
}

};

int main27(){
	cout<<sizeof(A)<<endl;
	cout<<sizeof(B)<<endl;
	B arr_b[]={B(0),B(1),B(2)};
	B* p_a=NULL;
	int i=0;
	for(p_a=&arr_b[0],i=0;i<3;i++,p_a++){
		p_a->printA();
	}
	return 0;
}
